#include <stdio.h>
#include <string.h>

int main()
{
    float f = 1.1234567890;
    printf("%f\n", f);
    printf("%g\n", f);
    printf("%e\n", f);
    double d = 1.12345678901234567890123456789012345678901234567890123456789012345678901234567890;
    printf("%.10lf\n", d);
    printf("%g\n", d);
    printf("%e\n", d);
    double g = 112.123;
    printf("%g\n", g);
    printf("%e\n", g);
    char *s1 = "   aaaaa";
    char *s2 = "bbb";
    printf("%-2s\n", s1);
    printf("%+2s\n", s2);
    int i1 = 10;
    int i2 = -8;
    printf("% d\n", i1);
    printf("% d\n", i2);
    printf("% o\n", i1);
    printf("% x\n", i1);

    char *string1 = "this is a test string";

    int len = strlen(string1);

    printf("len:%d,%s\r\n", len, string1);
    printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\r\n");
    printf("%15s|\r\n%*s|\r\n%-30s|\r\n", string1, 30, string1, string1);
    printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\r\n");
    printf("%.15s|\r\n%.*s|\r\n%-.30s|\r\n", string1, 30, string1, string1);
    printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\r\n");

    printf("%013lld \n", 1);
    printf("%3lld%% \n", 2222);
    return 0;
}
